function register() {
    var password = $.trim($("input[name=password]").val());
    var rePassword = $.trim($("input[name=repassword]").val());
    if (password === "") {
        toast("请输入密码！");
        return false;
    }
    if (password !== rePassword) {
        toast("密码不一致！");
        return false;
    }
    var param = $.paramToObj(window.location.href);
    ajax({
        url: "/api/user/channelLogin",
        type: "post",
        dataType: "json",
        headers: {},
        data: {
            mobile: param.mobile,
            channel: param.channel,
            secret: param.secret,
            passwd: password,
            regid: getClientInfo(),
            type: osName()
        },
        success: function (result) {
            switch (result.code) {
                case 0:
                case '0': {
                    toast(result.msg);
                    setLocalItem("user", new AppUserBean(result.data));
                    closeWebview("account-login");
                    closeWebview("account-mobile");
                    evalJs("my-index", 'reload()');
                    closeWebview();
                    break;
                }
                default: {
                    toast(result.msg);
                }
            }
        }
    });
}

function onPageReady() {
}